package com.tencent.wxcloudrun.exception;

/**
 */
public class BusinessException extends RuntimeException {
    private static final long serialVersionUID = 5534402702869437682L;
    private int code;
    private String describe;

    public BusinessException(ErrorCode errorCode, Object... params) {
        super(ErrorCode.getFullMessage(errorCode, params));
        this.code = errorCode.getEc();
        this.describe = ErrorCode.getDescribe(errorCode, params);
    }

    public int getCode() {
        return this.code;
    }

    public String getDescribe() {
        return this.describe;
    }
}